Prior to a critical section of length s seconds that must not be interrupted by unplanned disk writes, use syssgi() as follows:
The kernel will not initiate any deferred disk writes for s seconds. At the start of a period when disk activity can be tolerated, initiate a flush of the kernel's buffered writes with syssgi() as follows:syssgi(SGI_BDFLUSHCNT,s);
syssgi(SGI_SSYNC);
Note: This technique is most useful in a uniprocessor--code executing in an isolated CPU of a multiprocessor is not affected by kernel disk writes.